home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- #+++
- # RCS listbom,v 1.1 1995/07/30 23:00:11 tom Exp
- # title: listbom
- # abstract: List contents of *.bom, for PackageInspector.
- # author: T.R.Hageman
- # created: July 1995
- # modified: (see RCS Log at end)
- # copyleft:
- #
- # Copyright (C) 1995 Tom R. Hageman.
- #
- # This is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or
- # (at your option) any later version.
- #
- # This software is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with this software; if not, write to the Free Software
- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- #
- # description:
- #
- # This script is not yet part of PackageInspector,
- # but will be (sometime...)
- #
- # TODO:
- # Devise smart output format to limit line length.
- # Build the supporting machinery in PackageInspector itself.
- #---
-
- #
-
- bom="$1"
- lsbom='/usr/etc/lsbom'
-
- [ -n "$bom" ] || { exit 1; }
-
- case "`file $bom`" in
- *Cannot\ stat )
- ;;
- *data )
- [ -r $lsbom ] && exec $lsbom -f -l $bom
- ;;
- *text )
- exec cat $bom
- ;;
- esac | sed 's|^\./||' | awk '{
- printf("%6d\t%s\n", $4, $1)
- }'
-